var obj = {
    name: 'xiaoming',
    age: 18
}
// 结合好处一：不再直接操作对象
// 结合好处二：返回一个Boolean类型，可以进行判断
var objProxy = new Proxy(obj,{
    set(target,key,newValue){
        console.log('set被调用啦');
        return Reflect.set(target,key,newValue);
    },
    get: function (target,key) {
        console.log('get被调用啦')
        return Reflect.get(target, key);
    }
})
obj.name = 'ddd';
console.log(obj.name)
